﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StorePrgram.Data;
using StorePrgram.Logic;

namespace StorePrgram.Logic
{
    static class ProductsDispatcher
    {
        public static bool IsBarcodeValid(string barcode)
        {
            try
            {
                int tempBarcode = Int32.Parse(barcode);
                return true;
            }
            catch (Exception)
            {
                return false;   
            }
        }

        public static Product GetProductByID(int barcode)
        {
            Product product;
            product = StoreDBDataManager.GetProductByID(barcode);

            return product;
        }
    }
}
